package com.chaodev.base.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@ApiModel(value = "TbTraining对象",description = "培训课程表")
@Data
public class Training implements Serializable {
    @ApiModelProperty(value = "ID值")
    private Integer id;

    @ApiModelProperty(value = "培训课程编码")
    private String trainingCode;

    @ApiModelProperty(value = "培训课程名称")
    private String name;

    @ApiModelProperty(value = "培训课程主题ID")
    private Integer trainingItemId;

    @ApiModelProperty(value = "培训课程主题名称")
    private String trainingItemName;

    @ApiModelProperty(value = "参与人数")
    private String number;

    @ApiModelProperty(value = "报名时间")
    @DateTimeFormat(pattern = "yyyy-MM-ddHH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime registrationTime;

    @ApiModelProperty(value = "截止时间")
    @DateTimeFormat(pattern = "yyyy-MM-ddHH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deadline;

    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-ddHH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginTime;

    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-ddHH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "培训课程状态")
    private Integer status; //0-无效,1-未开始,2-已开始,3-已结束

    @ApiModelProperty(value = "创建人ID")
    private String createId;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-ddHH:mm:ss")
    @JsonFormat(locale = "zh",timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "负责人ID")
    private String directorId;

    @ApiModelProperty(value = "负责人")
    private String directorName;

    @ApiModelProperty(value = "课程内容")
    private String content;

    @ApiModelProperty(value = "预计学习时长")
    private Integer learningDuration;

    @ApiModelProperty(value = "培训分类ID")
    private Integer categoryId;

    @ApiModelProperty(value = "培训分类名称")
    private String categoryName;

    @ApiModelProperty(value = "访问量")
    private Integer visitNum;

    @ApiModelProperty(value = "积分")
    private Integer points;

    /**
     * 区分哪一端来调用接口
     * 1-管理端，2-用户端
     */
    private Integer dataType;

}
